<template>
  <div class="index">
    <!-- 二级路由的占位组件 -->
    <transition name="fade" mode="out-in">
        <router-view></router-view>
    </transition>


     <!-- Tabbar组件 -->
     <van-tabbar route v-model="active" active-color="#f00">
      <van-tabbar-item icon="home-o" to="/index/home">首页</van-tabbar-item>
      <van-tabbar-item icon="home-o" to="/index/list">爆爆团</van-tabbar-item>
      <van-tabbar-item icon="friends-o" to="/index/order">订单</van-tabbar-item>
      <van-tabbar-item icon="location-o" to="/index/mine">我的</van-tabbar-item>
    </van-tabbar>
    <!-- <div class="tabbar">
        <router-link to="/index/home">首页</router-link>
        <router-link to="/index/list">爆爆团</router-link>
      <router-link to="/index/order">订单</router-link>
      <router-link to="/index/mine">我的</router-link>
    </div> -->
  </div>

</template>

<script>
export default {
  data(){
    return {
      active:0,
      arr:[]
    }
  },
  mounted(){
    
  }
}
</script>

<style lang="scss" scoped>
// .tabbar{
//     background-color: white;
//   display: flex;
//   justify-content: space-around;
//   align-items: center;
//   position: fixed;
//   bottom: 0;
//   width: 100%;
//   padding: 10px 0;
//   border-top: 1px solid #ccc;
// }

// 入场动画
.fade-enter {
  opacity: 0;

}

.fade-enter-active {
  transition: all 0.2s;
}

.fade-enter-to {
  opacity: 1;

}

// 离场动画
.fade-leave {
  opacity: 1;
}

.fade-leave-active {
  transition: all 0.2s;
}

.fade-leave-to {
  opacity: 0;

}
</style>
